Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

feat(tantivy): Phase 2 feature parity with Orama

Summary

This PR implements Phase 2 feature parity improvements for the tantivy search plugin:

  1. Field boosting: Title field now receives 3x boost using BoostQuery to match Orama's title:3, content:1 behavior
  2. Improved fuzzy search quality: Restructured query to require ALL terms (Must) while keeping per-field subclauses as Should. Previously, documents could match with only one term in one field.
  3. doc_type filtering: Added doc_type filter to SearchFilters using TermQuery
  4. Count collector: SearchResult now includes total hit count using tuple collector (TopDocs, Count)

Review & Testing Checklist for Human

  • Verify fuzzy search behavior change is acceptable: The query structure changed significantly - now ALL search terms must be present (each term must match in title OR content). This is stricter than before where a single term match was sufficient. Test with multi-word queries to confirm expected behavior.
  • Test doc_type filtering: Add documents with different doc_type values and verify filtering works correctly
  • Verify count accuracy: Ensure the count field returns the total number of matching documents, not just the number of returned hits (which is limited by request.limit)
  • Check downstream consumers: SearchResult now requires count field - verify any code consuming this API handles the new field

Notes

The TITLE_BOOST value of 3.0 is hardcoded to match Orama's behavior. If configurability is needed, this could be exposed as a search option in a future PR.

Link to Devin run: https://app.devin.ai/sessions/57e748ed9bda4cfba78dc1512c56d51f
Requested by: yujonglee (@yujonglee)

devin-ai-integration bot and others added 2 commits January 4, 2026 12:31
- Add field boosting: title field now has 3x boost using BoostQuery
- Improve fuzzy search quality: restructured to require all terms (Must)
  while keeping per-field subclauses as Should
- Add doc_type filtering: SearchFilters now supports doc_type filter
- Add Count collector: SearchResult now includes total hit count

Co-Authored-By: yujonglee <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 41b6b2a
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/695a5df256d9740008a0583a

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 41b6b2a
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/695a5df2cf78e90008483139

@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for howto-fix-macos-audio-selection canceled.

Name Link
🔨 Latest commit 41b6b2a
🔍 Latest deploy log https://app.netlify.com/projects/howto-fix-macos-audio-selection/deploys/695a5df256d9740008a0583e

@yujonglee yujonglee merged commit d5fdd78 into main Jan 4, 2026
17 of 22 checks passed
@yujonglee yujonglee deleted the devin/1767529329-tantivy-phase2-features branch January 4, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants